# -*- coding: utf-8 -*-
# 姓名:谚语
# 开发时间:2022/10/27 8:40
from flask import Blueprint
from flask_restful import Api
from comment.utils.output import output_json

# 初始化消息模块的蓝图
# Blueprint(名字, __name__, 前缀)
card_bp = Blueprint('cards', __name__, url_prefix='/card')
card_api = Api(card_bp)

# 使用自定义json格式，代替装饰器的写法
# representation(响应的数据是什么类型)(传入函数名【切记不要调用flask框架自动调用】)
card_api.representation('application/json')(output_json)

from financial.resources.card.card_resource import *

card_api.add_resource(Card_Resource, '/card', endpoint='card')
